<section class="content-header">
    <h1>

    </h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box-tools">
                <div class="input-group input-group-sm" style="width: 150px;">
                    <a href="{:url('/Index/User/Role/add')}" class="btn btn-block btn-info" data-toggle="modal" data-target="#base_role_modal">添加角色</a>
                </div>
            </div>

            <div class="box">

                <div class="box-header">
                    <h3 class="box-title">角色列表</h3>

                    <div class="box-tools">

                    </div>
                </div>
                <!-- /.box-header -->

                <div class="box-body table-responsive no-padding">
                    <table class="table table-hover">
                        <tbody>
                            <tr>
                                <th>标号</th>
                                <th>名称</th>
                                <th>项目权限</th>
                                <th>添加时间</th>
                                <th>操作</th>
                            </tr>
                            {volist name="data_list" id="vo" key="key"}
                            <tr>
                                <td>{$key}</td>

                                <td>{$vo.name}</td>
                                <td>
                                    {if condition="$vo.is_project==1"} 所有项目权限 {else} 参与项目权限 {/if}
                                </td>
                                <td>{$vo.create_time}</td>



                                <td>
                                    <a href="javascript:;" data-url="{:url('/Index/User/Role/del')}" param="{$vo.id}" class="btn label-danger data_del_items">删除</a>

                                    <a href="{:url('/Index/User/Role/edit',['id'=>$vo.id])}" class="btn label-info" data-toggle="modal" data-target="#base_role_modal">编辑</a>
                                    <a href="javascript:;" class="btn label-info" onclick="open_tab('role_access','{:url(\'/Index/Menu/access\',[\'role_id\'=>$vo.id])}','查看处理详情')">权限分配</a>

                                    <!---->
                                    {if condition="$vo.is_project==1"}
                                    <!---->
                                    <a href="{:url('/Index/User/Role/unsetproject')}" class="btn label-info bg-purple  ajax_operation" target_item="id" data-id="{$vo.id}">允许查看参与项目</a> {else}

                                    <!---->
                                    <a href="{:url('/Index/User/Role/setproject')}" class="btn label-info ajax_operation" target_item="id" data-id="{$vo.id}">允许查看所有项目</a>

                                    <!---->
                                    {/if}
                                </td>
                            </tr>
                            {/volist}
                        </tbody>
                    </table>

                    <div class="col-sm-7">
                        {$page}

                    </div>
                </div </div>
            </div>
        </div>
</section>
<div class="modal " id="base_role_modal">
    <div class="modal-dialog ">
        <div class="modal-content "></div>
    </div>
</div>
<script src="/public/admin/js/common.js"></script>